<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String port = request.getServerPort() == 80 ? "" : ":".concat(request.getServerPort()+"");
	String path = request.getScheme().concat("://").concat(request.getServerName()).concat(port).concat(request.getContextPath());
	request.setAttribute("path", path);
	String version = new SimpleDateFormat("yyyyMMdd").format(new Date());
%>
<!DOCTYPE html>
<html>
<head>
<title>我的IT知识库 - <c:if test="${param.page != null && param.page != 1}">第${param.page }页 - </c:if>IT答案网</title>
<meta name="keywords" content="IT知识库,IT搜索,问题搜索,Web前端,企业架构,编程语言,互联网,系统运维,云计算,数据库,移动开发,JAVA问题,Android问题,IOS问题,c/c++问题,解决方案" />
<meta name="description" content="我的IT知识库:是一个专门为开发者创建的专业搜索引擎，开发者可以在这里搜索有关Web前端,企业架构,编程语言,互联网,系统运维,云计算,数据库,移动开发的问题答案，海量国内外IT解决方案尽在IT答案网。" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="${path }/view/portal/css/all.css?version=<%=version %>" rel="stylesheet">
<link href="${path }/view/portal/css/prettify.css?version=<%=version %>" rel="stylesheet">
<script src="${path }/view/portal/js/all.js?version=<%=version %>"></script>
<script src="${path }/view/portal/js/code.js?version=<%=version %>"></script>
</head>
<body onload="prettyPrint()">

    <jsp:include page="head.jsp"></jsp:include>

	<div class="container container1000">
		<div class="row-fluid" style="margin-bottom:20px;">
		    <h1><em class="text-success">www.ITdaan.com</em> <span class="visible-desktop"><small>开发者的专业知识库. </small></<span></h1>
			<div class="span8">
				<form class="form-search" action="so" name="search-form">
					<div class="input-append span10">
						<center>
							<input type="text" class="span12 search-query sinput" name="q" value="" placeholder=" 在${resultCount }个IT解决方案中搜索..." baiduSug="1">
							<button type="submit" class="btn btn-success">搜索答案</button>
						</center>
					</div>
				</form>
			</div>
			<div class="span4 visible-desktop" style="vertical-align: middle;padding-top:10px;color:gray;font-size:13px;"> 找到<span style="color:green;font-weight:bold;font-style:italic;">${resultCount }</span>条记录</div>
		</div>
		<p class="hidden-xs">
		这是一个提供给广大IT开发者的专业知识库，它收集国内外大量的IT解决方案。赶紧使用它搜一把来解决您在开发中遇到的问题吧。目前，本站已经收集<strong class="text-success">${resultCount }</strong>个IT解决方案。</a>
		</p>		
		<div class="row-fluid">
			<div class="span9" style="width:700px;">
				<h3 class="text-success">最新加入本站</h3>			
				<hr/>
				<c:forEach items="${users }" var="user">
				  <img class="tip img-circle" src="${user.avatar }" alt="${user.name }" original-title="${user.name }" width="50" height="50">
				</c:forEach>
				<hr/>
				<ul class="nav nav-tabs">
				  <li class="active"><a href="#hostest" data-toggle="tab" class="text-success"><strong>最热门的</strong></a></li>
				  <li><a href="#collection_more" data-toggle="tab" class="text-success"><strong>收藏最多</strong></a></li>
				  <li><a href="#recommend_more" data-toggle="tab" class="text-success"><strong>推荐最多</strong></a></li>
				</ul>
				<div class="tab-content">
				  <!-- 最热门 -->
				  <div class="tab-pane active" id="hostest">
				    <table class="table table-striped">
					    <thead>
					      <tr>
					        <th>#</th>
					        <th>标题</th>
					        <th>查看</th>
					        <th>发表时间</th>
					      </tr>
					    </thead>
					    <tbody>
					    <c:forEach items="${hostestBlogs }" var="blog" varStatus="status">
					       <tr>
					        <td>${status.index+1 }</td>
					        <td><a href="${path }/blog/${fn:replace(fn:substring(blog.postTime,0,10),'-','/') }/${blog.id }.html" target="_blank" class="black_">${blog.title }</a></td>
					        <td>${blog.viewNum }</td>
					        <td>${fn:substring(blog.postTime,0,10) }</td>
					       </tr>
					    </c:forEach>	    
					    </tbody>
				     </table>
				  </div>
				  <!-- 收藏数最多的 -->
				  <div class="tab-pane" id="collection_more">
				    <table class="table table-striped">
					    <thead>
					      <tr>
					        <th>#</th>
					        <th>标题</th>
					        <th>收藏</th>
					        <th>发表时间</th>
					      </tr>
					    </thead>
					    <tbody>
					    <c:forEach items="${collectionMoreBlogs }" var="blog" varStatus="status">
					       <tr>
					        <td>${status.index+1 }</td>
					        <td><a href="${path }/blog/${fn:replace(fn:substring(blog.postTime,0,10),'-','/') }/${blog.id }.html" target="_blank" class="black_">${blog.title }</a></td>
					        <td>${blog.collectionNum }</td>
					        <td>${fn:substring(blog.postTime,0,10) }</td>
					       </tr>
					    </c:forEach>	    
					    </tbody>
				     </table>    
				  </div>
				  <div class="tab-pane" id="recommend_more">
				    <table class="table table-striped">
					    <thead>
					      <tr>
					        <th>#</th>
					        <th>标题</th>
					        <th>推荐</th>
					        <th>发表时间</th>
					      </tr>
					    </thead>
					    <tbody>
					    <c:forEach items="${recommendMoreBlogs }" var="blog" varStatus="status">
					       <tr>
					        <td>${status.index+1 }</td>
					        <td><a href="${path }/blog/${fn:replace(fn:substring(blog.postTime,0,10),'-','/') }/${blog.id }.html" target="_blank" class="black_">${blog.title }</a></td>
					        <td>${blog.recommendNum }</td>
					        <td>${fn:substring(blog.postTime,0,10) }</td>
					       </tr>
					    </c:forEach>	    
					    </tbody>
				     </table> 				  
				  </div>
				</div>  
			    <br/>
			</div>
			<div class="span3" style="width:250px;">
				<div class="side-ask alert alert-warning login-area" style="padding:8px 8px 30px 8px">
                     &nbsp;&nbsp;&nbsp;&nbsp;使用第三方账号免注册登录 <br/> <br/>
                     <a href="user/beforeLogin4qq" class="mt10 btn btn-primary btn-block" style="width:100%">
                         <img alt="使用qq登陆" title="使用qq登陆" src="view/user/img/qq30.png?rand=1" class="img-circle" width="20" height="20">
                                                                        使用QQ登录    
                     </a>
                     <a href="user/beforeLogin4qq" class="mt10 btn btn-danger btn-block" style="width:100%">
                         <img alt="使用qq登陆" title="使用qq登陆" src="view/user/img/sina30.png?rand=1" class="img-circle" width="20" height="20">
                                                                        使用微博登录    
                     </a>                        
	             </div>
				  <div class="list-group-head" href="javascript:void(0)" style="background-color:#5bb75b;background-image: linear-gradient(to bottom, #62c462, #51a351);color:white"><i class="icon-th-list icon-white"></i><span style="margin-left:5px">作者排行</span></div>
				  <c:forEach items="${authors }" var="author">
				     <a class="list-group-item" href="omember/${author.webId }/${author.base64Author }.html" target="_blank"><span class="badge" style="background-color:green;">${author.blogCount }</span><c:if test="${author.blogCount >= 1000}"><i class="icon-fire icon-red"></i></c:if> ${author.author }</a>
				  </c:forEach>
			 </div>	
		</div>
	</div>
    
    <div class="clear">&nbsp;</div>
    <input name="path" value="${path }" type="hidden"/>
	<jsp:include page="bottom.jsp"></jsp:include>
	
</body>
</html>